SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 54454: The generated DS2 code for a rule flow might not be correct when the code has more than one rule set with one rule set containing OR logic

DetailsHotfixAboutRate It

SAS® Business Rules Manager might not generate DS2 code correctly for a rule flow. The problem occurs when rule flow has more than one rule set, and one of the rule sets contains a rule having OR logic.

There are no errors or warnings to indicate a problem.

To work around this problem, break compound rules into separate rules.

Click the Hot Fix tab in this note to access the hot fix for this issue.

EXAMPLE

A rule flow contains the following two rule sets.

Rule Set1:   If (DAY=DAY)     Then Top1=1; Top2=2
Rule Set2:   If QUANTITY=1
             Or QUANTITY=2
             Or QUANTITY=3    Then Flag="fired"

Run a test on the rule flow. The output result is wrong. When QUANTITY=2, the term Flag should be assigned to "fired". However, the assignment is not performed. See the screen shot.

image label

You can examine the rule flow code by opening the rule flow. Click the Tests menu item. Click the Results tab. Click Code . The action expressions are assigned incorrectly for the OR rules, as displayed in this code:

else if ("QUANTITY" = 2.0) then do; recordRuleFired(rulesFiredForRecordCount,11675); "Top2" = 2.0; "Top1" = 1.0; end;

The correct code should be the following:

else if ("QUANTITY" = 2.0) then do; recordRuleFired(rulesFiredForRecordCount,11675); "Flag" = 'fired'; end;


Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Business Rules ManagerMicrosoft® Windows® for x642.23.19.4 TS1M29.4 TS1M3
Microsoft Windows 8 Enterprise 32-bit2.23.19.4 TS1M29.4 TS1M3
Microsoft Windows 8 Enterprise x642.23.19.4 TS1M29.4 TS1M3
Microsoft Windows 8 Pro 32-bit2.23.19.4 TS1M29.4 TS1M3
Microsoft Windows 8 Pro x642.23.19.4 TS1M29.4 TS1M3
Microsoft Windows 8.1 Enterprise 32-bit2.23.19.4 TS1M29.4 TS1M3
Microsoft Windows 8.1 Enterprise x642.23.19.4 TS1M29.4 TS1M3
Microsoft Windows 8.1 Pro2.23.19.4 TS1M29.4 TS1M3
Microsoft Windows 8.1 Pro 32-bit2.23.19.4 TS1M29.4 TS1M3
Microsoft Windows Server 20082.23.19.4 TS1M29.4 TS1M3
Microsoft Windows Server 2008 R22.23.19.4 TS1M29.4 TS1M3
Microsoft Windows Server 2008 for x642.23.19.4 TS1M29.4 TS1M3
Microsoft Windows Server 2012 Datacenter2.23.19.4 TS1M29.4 TS1M3
Microsoft Windows Server 2012 R2 Datacenter2.23.19.4 TS1M29.4 TS1M3
Microsoft Windows Server 2012 R2 Std2.23.19.4 TS1M29.4 TS1M3
Microsoft Windows Server 2012 Std2.23.19.4 TS1M29.4 TS1M3
Windows 7 Enterprise 32 bit2.23.19.4 TS1M29.4 TS1M3
Windows 7 Enterprise x642.23.19.4 TS1M29.4 TS1M3
Windows 7 Home Premium 32 bit2.23.19.4 TS1M29.4 TS1M3
Windows 7 Home Premium x642.23.19.4 TS1M29.4 TS1M3
Windows 7 Professional 32 bit2.23.19.4 TS1M29.4 TS1M3
Windows 7 Professional x642.23.19.4 TS1M29.4 TS1M3
Windows 7 Ultimate 32 bit2.23.19.4 TS1M29.4 TS1M3
Windows 7 Ultimate x642.23.19.4 TS1M29.4 TS1M3
64-bit Enabled AIX2.23.19.4 TS1M29.4 TS1M3
64-bit Enabled Solaris2.23.19.4 TS1M29.4 TS1M3
HP-UX IPF2.23.19.4 TS1M29.4 TS1M3
Linux for x642.23.19.4 TS1M29.4 TS1M3
Solaris for x642.23.19.4 TS1M29.4 TS1M3
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.